<template>
	<view class="mask Column" style="align-items: center;" >
		<view class="panelbg Column">
			<view class="width100 Row closepbg" @click="closepanel()"><image src="https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0506899995.png?tdsourcetag=s_pctim_aiomsg" class="closebtn" /></view>
			<view class="width90 Row" style="margin-top: 30upx;">
				<text>{{ title }}</text>
			</view>
			<view class="itemborderbg Row Center" @click="OnSetCopy()">
				<image src="https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0270105793.png?tdsourcetag=s_pctim_aiomsg" style="height: 50upx;width: 50upx;" />
				<view class="Row height100" style="width: 200upx;align-items: center;"><text style="margin-left: 20upx;">加微信客服</text></view>
			</view>
			<view class="itemborderbg Row Center" @click="callcusphone()">
				<image src="https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0273157369.png?tdsourcetag=s_pctim_aiomsg" style="height: 50upx;width: 50upx;" />
				<view class="Row height100" style="width: 200upx;align-items: center;"><text style="margin-left: 20upx;">电话客服</text></view>
			</view>
		</view>	
	</view>
</template>

<script>
export default {
	props: {
		show: Boolean,
		title: {
			type: String,
			default: '一些提示语'
		}
	},
	model: {
		prop: 'show',
		event: 'change'
	},
	data() {
		return {};
	},
	methods: {
		async OnSetCopy() {
			let clipboard = await this.$utils.system.setClipboardData('wwmm96696907');
			// if (clipboard.err == null) {
			// 	return;
			// }
			this.$message.showToast('已复制微信号，请至微信添加好友');
		},
		callcusphone() {
			let phoneNumber = '96696907';
			if (this.$store.user.Location.addresses.province != '贵州省') {
				phoneNumber = '0851' + phoneNumber;
			}
			uni.makePhoneCall({
				phoneNumber: phoneNumber //仅为示例
			});
		},
		onchange: function() {
			this.$emit('change', this.show);
		},
		closepanel(){
			this.$emit('closecuspanel', false)
		}
	}
};
</script>

<style>
.panelbg {
	margin-top: 300upx;
	width: 90%;
	/* height: 500upx; */
	background-color: #ffffff;
	border-radius: 10upx;
	align-items: center;
	padding-bottom: 40upx;
}
.closepbg {
	display: flex;
	flex-direction: row;
	width: 100%;
	justify-content: flex-end;
	margin-top: 10upx;
}
.closebtn {
	width: 50upx;
	height: 50upx;
	margin-right: 20upx;
}
.itemborderbg {
	border-radius: 10upx;
	border: #666666 2upx solid;
	width: 90%;
	height: 80upx;
	margin-top: 40upx;
	font-size: 32upx;
}
</style>
